package set_;


import java.util.HashSet;
import java.util.Set;

/**
 * @author wly
 * @version V1.0.0
 * @date 2023/1/11 15:52
 */
public class HashSet_ {
    public static void main(String[] args) {
        Set hashSet = new HashSet();
        hashSet.add(null);
        hashSet.add(null);
        System.out.println("hashSet=" + hashSet);
        System.out.println(hashSet.add("tom"));
        System.out.println(hashSet.add("john"));//T
        System.out.println(hashSet.add("lucy"));//T
        System.out.println(hashSet.add("john"));//F
        System.out.println("hashSet=" + hashSet);
        System.out.println(hashSet.add(new String("wly")));
        System.out.println(hashSet.add(new String("wly")));
        System.out.println("hashSet=" + hashSet);
    }
}
